package com.ctvit.syn.service;

public class SyncTableInfo {
	private String op;
	private String sourceDb;
	private String destDb;
	private String tablename;
	private String[] pkFieldName;
	private String[] pkFieldValue;
	public String getTablename() {
		return tablename;
	}
	public void setTablename(String tablename) {
		this.tablename = tablename;
	}
	public String[] getPkFieldName() {
		return pkFieldName;
	}
	public void setPkFieldName(String[] pkFieldName) {
		this.pkFieldName = pkFieldName;
	}
	@Override
	public String toString(){
		 String ret="table:"+tablename+";PK: ";
		 for(String s:pkFieldName){
			 ret+="   "+s;
		 }
		 return ret;
	}
	 //拷过来的时候 就没有用过这个function
	//经过测试 主键大于两个的时候，这个function就有问题
	public boolean isPk(String columnName){
		for(String pk:pkFieldName){
			return columnName.equalsIgnoreCase(pk);
		}
		return false;
	}
	public String getSourceDb() {
		return sourceDb;
	}
	public void setSourceDb(String sourceDb) {
		this.sourceDb = sourceDb;
	}
	public String getDestDb() {
		return destDb;
	}
	public void setDestDb(String destDb) {
		this.destDb = destDb;
	}
	public String getOp() {
		return op;
	}
	public void setOp(String op) {
		this.op = op;
	}
	public String[] getPkFieldValue() {
		return pkFieldValue;
	}
	public void setPkFieldValue(String[] pkFieldValue) {
		this.pkFieldValue = pkFieldValue;
	}
}
